package org.lanqiao.demo12.commom;


import lombok.Data;

import java.io.Serializable;
@Data
public class Result implements Serializable {
    private String massage;

    public Result(String massage, Object data, Integer code) {
        this.massage = massage;
        this.data = data;
        this.code = code;
    }

    private Object data;
    private Integer code;



    /**
     * 成功
     * @param massage
     * @param data
     * @return
     * */
    public static Result OK(String massage,Object data){return new Result(massage,data,200);}


    /***
     * 失败
     * @param massage
     * @return
     * */
    public static Result FAIL(String massage){return new Result(massage,null,500);}


}
